import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:sui_shou_pai/module/top_bar.dart';

import 'likes/liked_news_list.dart';
import 'likes/liked_photo_records_list.dart';

class MyLike extends StatefulWidget {
  @override
  _MyLikeState createState() => _MyLikeState();
}

class _MyLikeState extends State<MyLike> with TickerProviderStateMixin {
  List<Tab> tabLabels = [Tab(text: '新闻'), Tab(text: '记录')];

  TabController _tabController;

  @override
  void initState() {
    super.initState();
    _tabController = TabController(length: tabLabels.length, vsync: this);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("我的点赞"),
        bottom: initTabBar(tabLabels, _tabController),
      ),
      body: TabBarView(
        controller: _tabController,
        children: <Widget>[LikedCompanyNewsList(), LikedPhotoRecordsList()],
      ),
    );
  }
}
